﻿<!--#include file="include/Money_ratio.asp"-->
<!--#include file="include/conn_f.asp"-->
<!--#include file="top.asp"-->
<!--#include file="left.asp"-->
<strong>
    <center>
        积分换礼品活动<p>
            <br />
            <font color='red'>积分永久有效,不过期!<br />
                我们将不定期推出新的礼品,请客户常来游龙网挑选喜欢的礼品.</font><br />
            <br />
</strong>
<%
If Session("cust_id")="" Then
    Response.Write "请先登录!"
    Response.End
End If
sql="select buytimes,available_bonus from customer where cust_id="&Session("cust_id")
Set rs_cust=conn.execute(sql)
If Not rs_cust.eof Then
    total_bouns=rs_cust("buytimes")
    available_bonus=rs_cust("available_bonus")
    Response.Write "您的可用积分:"&available_bonus
End If
If total_bouns=0 Then
    Response.End
End If
%>
<br />
<form action='jifen2card_step2.asp' method='post'>
<table align="center" width="500" border="1" cellspacing="0" class="unnamed1">
    <tr>
        <td>
            礼品名称
        </td>
        <td>
            商品类型
        </td>
        <td>
            每份消耗积分
        </td>
        <td>
            说明
        </td>
    </tr>
    <%
sql="select * from bonus_card  where status=1 order by bonus_per asc"
Set rs=conn.execute(sql)

while Not rs.eof	
    Response.Write "<tr><td>"
    Response.Write "<input name='bonus_card_id' type='radio' value='"&rs("bonus_card_id")&"'>"
    sql="select a.miane,a.goods_type,b.card_name from card as a left join card_infor as b on a.card_infor_id=b.card_info_id where card_id="&rs("card_id")
    Set rs_card=conn.execute(sql)
    If Not rs_card.eof Then
        Response.Write rs_card("card_name")&"-"&rs_card("miane")
        
        Response.Write "</td><td>"
        If rs_card("goods_type")=0 Then
            Response.Write "卡密"
        ElseIf rs_card("goods_type")=1 Then
            Response.Write "直充"
        ElseIf rs_card("goods_type")=4 Then
            Response.Write "密码保护卡"
        End If
    End If
    Response.Write "</td><td>"&rs("bonus_per")&"</td><td>"
    Response.Write "活动结束日期:"&rs("limit_time")&"<br />"
    Response.Write "活动商品数量:"&rs("limit_total")&",送完此项活动即结束!<br />"
    Response.Write "每客户限换礼品数量:"&rs("limit_per_account")&"<br />"
    Response.Write "<font color='red'>剩余礼品数量:"&rs("amount_left")
    Response.Write "</font></td></tr>"
    rs.movenext	
wend
Response.Write "</table><br /><br />"

Response.Write "选购数量:<select name='amount'>"
For i=1 to 10
    Response.Write "<option value='"&i&"'>"&i
Next
Response.Write "</select><br /><br />"	

Response.Write "<input type='submit' value='确定'>"
    %>
</form>
<strong><font color='red'>积分永久有效,不过期!<br />
    我们将不定期推出新的礼品,请客户常来游龙网挑选喜欢的礼品.</font><br />
    <br />
</strong>

<!--#include file="bottom.asp"-->
